<template>
	<view>
		<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="uni-ec-canvas" canvas-id="uni-ec-canvas" :ec="ec"></uni-ec-canvas>
	</view>
</template>
<script>
	// 此处将路径替换为你放置该组件的路径  
	import uniEcCanvas from '../../../components/uni-ec-canvas/uni-ec-canvas.vue'

	export default {
		data() {
			return {
				ec: {
					options: {
						//定义一个标题
						title: {
							text: 'AI'
						},
						legend: {
							data: ['AI']
						},
						axisPointer: {
							show: true,
							type: 'line'
						},
						//X轴设置
						xAxis: {
							data: ['ML', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL',
								'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL', 'DL-GAN', 'DL', 'TL', 'RL',
								'DL-GAN'
							]
						},
						yAxis: {},
						//name=legend.data的时候才能显示图例
						series: [{
							name: '量',
							type: 'bar',
							data: ['12', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60',
								'32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45',
								'78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60',
								'32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45',
								'78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60',
								'32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45',
								'78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60',
								'32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45',
								'78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60',
								'32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60', '32', '45', '78', '60'
							]
						}]
					} //echart 配置项
				}
			}
		},
		components: {
			uniEcCanvas
		}
	}
</script>
<style>
	.uni-ec-canvas {
		width: 100%;
		height: 100%;
		display: block;
	}
</style>
